package com.power.feign;

import com.power.domain.MemberAddr;
import com.power.feign.sentinel.OrderMemberFeignSentinel;
import com.power.model.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description 订单业务模块调用用户模块接口
 * @Author dingchunlin
 * @Date 2024/07/20 17:29
 * @Version 1.0.0
 */
@FeignClient(value = "member-service", fallback = OrderMemberFeignSentinel.class)
public interface OrderMemberFeign {

    @GetMapping("/p/address/getMemberAddrById")
    Result<MemberAddr> getMemberAddrById(@RequestParam Long addrId);

    @GetMapping("/p/address/getMemberDefaultAddrByOpenId")
    Result<MemberAddr> getMemberDefaultAddrByOpenId(@RequestParam String openId);

    @GetMapping("/admin/user/getNickNameByOpenId")
    Result<String> getNickNameByOpenId(@RequestParam String openId);
}
